package com.dongan.utils;

/**
 * @ClassName:ReulstResponseUtil
 * @Description:结果返回工具类
 * @Author:longtao
 * @Date:2021/6/15
 * @Version:1.0
 */
public class ResultResponseUtil {

    private boolean flag;//操作是否成功
    private String message;//提示的消息
    private Object data;//返回的数据


    public ResultResponseUtil() {
    }

    public ResultResponseUtil(boolean flag, Object data) {
        this.flag = flag;
        this.data = data;
    }

    public ResultResponseUtil(boolean flag, String message) {
        this.flag = flag;
        this.message = message;
    }

    public ResultResponseUtil(Object data) {
        this.data = data;
    }

    public ResultResponseUtil(boolean flag, String message, Object data) {
        this.flag = flag;
        this.message = message;
        this.data = data;
    }

    public boolean getFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "ResponseResult{" +
                "flag=" + flag +
                ", message='" + message + '\'' +
                ", data=" + data +
                '}';
    }
}
